<?php if(!IS_AJAX){?>
<include file="Public:header" />
<!-- 信息提醒 -->

<!-- 信息提醒结束 -->
<style>
.categorybtn {
	border-radius: 0;
	margin: 0;
	border: none;
}
.categorybtn.on {
	background: #fff;
	color: #47AEC8;
}
</style>

<div class="page-title chart-container"> </div>
<div class="row">
  <div class="col-sm-7 col-md-8 col-lg-9">
    <div class="panel panel-default">
      <div class="panel-heading"><span class="pagetitle">表格</span>
      
      <a href="##" id="ajaxlistboxaddbtn" class="pull-right" title="新建表格" rel="{:U('add')}" width="300">新建表格</a> 
      </div>
      <div class="panel-body"> 
        
        <!-- 客户列表 -->
        <div class="" id="ajaxlistbox">
          <?php }?>
          <!-- 数据主体 -->
          
          
          
<?php if(IS_AJAX){?>          
          
          <volist name="list" id="vo">
            <div class="DataListItem DataListItembg item{$vo.id}" id="ajaxlistbox-{$vo.id}" style="margin-top:4px; padding:0 5px;">
              <div class="row">
                <div class="col-sm-6 col-xs-12">
                  <div class="widget-content padded">
                    <h4 style="margin:0; font-size:16px; font-weight:bold; padding:5px 0;">{$vo.name} </h4>
                  </div>
                </div>
                <div class="col-sm-6 col-xs-12 hidden-xs" style="text-align:right;">
                  <div class="optionBtnBox"> 
                  
                  <a class="button OptionBtn" href="##" rel="{:U('edit', array('id' => $vo['id']))}" width="1000" title="修改表格【{$vo.name}】"><i class="fa icon-file"></i> 修改表格</a>　
                  
                  <a class="button" href="#window" onClick="_openWindow('{:U('getform', array('id' => $vo['id']))}', 500, '{$vo.name}', '确认', null, '');"><i class="fa icon-file"></i> 领取</a>　<a class="button deleteBtn" href="##" rel="{:U('delete', array('id' => $vo['id']))}" data-id="{$vo.id}"> 删除</a>
                  
                   </div>
                </div>
              </div>
             
             
            </div>
            <!-- 数据主体结束 --> 
          </volist>
          
<?php }?>          
          
          
          
          
          
          
          
          
        </div>
        </if>
        <?php if(!IS_AJAX){?>

        <div class="PagesBox" id="ajaxlistboxpages"></div>
        <!-- 客户列表结束 --> 
        
      </div>
    </div>
  </div>
  <div class="col-sm-5 col-md-4 col-lg-3">
  
  
  
  
  
  <div class="panel">
      <header class="panel-heading"> 表格分类
      <span class="pull-right"><a href="javascript:void(0);" id="infocategoryboxaddbtn" rel="<?php echo U('Formcategory/add');?>" width="300" title="新增表格分类">增加分类</a></span>
       </header>
      <div class="panel-body">
        <!-- 日志分类 -->
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tbody id="infocategorybox">
          </tbody>
        </table>
        <div id="infocategoryboxpages"></div><form id="ajaxlistboxform" action="<?php echo U('');?>"></form>
        <form action="<?php echo U('Formcategory/index');?>" id="infocategoryboxform">
        </form>
        <!-- -->
      </div>
    </div>
  
  
  
  
  
  

  </div>
</div>
<include file="Public:script" />

<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/ueditor/lang/zh-cn/zh-cn.js"></script>



<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/zTree_v3/css/zTreeStyle/zTreeStyle.css">
<script type="text/javascript" src="/Public/Js/zTree_v3/js/jquery.ztree.core-3.5.js"></script>

<script>


$('#infocategorybox').ajaxlist({nodata:'<div style="text-align:center;">暂无分类</div>', success:function(obj){
	
	obj.find('.titletext').each(function(index, element){
		$(this).removeClass('titletext');
		$(this).click(function(e) {
            var html = '<div id="member_pos_id'+$(this).attr('data-id')+'" class="alert alert-info" style="display:inline-block; margin-bottom:2px; margin-right:2px; padding:5px;"><button type="button" class="close close-sm" onclick="" data-dismiss="alert"> <i class="fa icon-times"></i> </button><strong><input type="hidden" value="'+$(this).attr('data-id')+'" name="id[]" class="NodeId" />'+$(this).html()+'</strong> </div>';
          $('#member_pos_id'+$(this).attr('data-id')).remove();
          $(html).appendTo('#ajaxlistboxform').find('.close').each(function(){
              $(this).click(function(e) {
                  setTimeout(function(){ $('#ajaxlistboxform').submit()}, 200);
              });
          });
          $('#ajaxlistboxform').submit();
        });
	});
}});



    $('#ajaxlistbox').ajaxlist({});
</script>


<style>
    #infocategorybox td{padding:5px;}
</style>
</body></html><?php }?>
